home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir36
/
ismouse.zip
/
ISMOUSE.ASM
< prev
next >
Wrap
Assembly Source File
|
1994-09-19
|
1KB
|
42 lines
; To detect a mouse and return an ERRORLEVEL in batch
; ERRORLEVEL == 0 -- no mouse
; ERRORLEVEL == 1 -- mouse
;
;
; modeled after code by:
; Written by Tom Gilbert - May, 1991 (MOUSRPT1.ZIP)
; Modification by W. Curtiss Priest
; Center for Information, Technology & Society
; 466 Pleasant Street
; Melrose, MA 02176
; 617-662-4044
;
;
;
;
;
cseg segment public byte 'CODE'
assume cs:cseg, ds:cseg, es:nothing
org 100h
ComEntry proc near ; program begins
jmp Start
db 13,'CITS Mouse Detector',26
NoFind: mov al,00h ; return code, mouse not found
jmp ShoOff ; and Return to MS-DOS
;
Start: mov ax,3533h ; Get Mouse Interrupt Address
int 21h ; es:bx == segment:offset of handler
mov ax,es ; Copy Segment for Test
or ax,bx ; If address UNassigned (es:0, bx:0)
jz NoFind ; Then "Mouse not installed"
xor ax,ax
int 33h ; Reset Mouse Driver and
inc ax ; If NOT a Minus 1 Return
jnz NoFind ; Then "Mouse not installed"
mov al,01h ; return code, found mouse
ShoOff: mov ah,4ch ; terminate with return code
int 21h ; terminate
cseg ends
end ComEntry